package itheima.zuoye.Test2;

import java.util.*;


public class Number {
    public static void main(String[] args) {
        List<String> phoneNumbers = Arrays.asList(

                "13512345678", "13612345678", "13712345678", "13812345678", "13912345678",
                "13512345678", "14012345678", "14112345678", "14212345678", "14312345678",
                "13612345678", "14412345678", "14512345678", "14612345678", "14712345678",
                "13712345678", "14812345678", "14912345678", "15012345678", "15112345678",
                "13812345678", "15212345678", "15312345678", "15412345678", "15512345678",
                "13912345678", "15612345678", "15712345678", "15812345678", "15912345678",
                "14012345678", "16012345678", "16112345678", "16212345678", "16312345678",
                "14112345678", "16412345678", "16512345678", "16612345678", "16712345678",
                "14212345678", "16812345678", "16912345678", "17012345678", "17112345678",
                "14312345678", "17212345678", "17312345678", "17412345678", "17512345678"
        );

        //2.需求2：50个电话号码，去除全部重复的电话号码

        Set<String> set = new HashSet<>();
        set.addAll(phoneNumbers);
        int count = 0;
        for (String s : set) {
            System.out.println(s);
            count++;
        System.out.println("Total phone numbers: " + count);
        }




    }
}
